.workspace {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.canvas-wrapper {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.canvas-stage {
  position: relative;
  display: inline-block;
  transform-origin: top left;
  will-change: transform;
}

.canvas-viewport {
  position: relative;
  display: inline-block;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(12, 29, 64, 0.08);
  transform-origin: top left;
  will-change: transform;
}

.canvas-viewport canvas {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  image-rendering: pixelated;
}

#baseCanvas,
#gridCanvas,
#selectionMaskCanvas,
#selectionContentCanvas,
#selectionOutlineCanvas {
  pointer-events: none;
}

#baseCanvas {
  z-index: 0;
}

#drawingCanvas {
  cursor: crosshair;
  touch-action: none;
  transition: cursor 0.15s ease;
}

#drawingCanvas.bucket-tool {
  cursor: cell;
}

#drawingCanvas.eyedropper-tool {
  cursor: crosshair;
}

#drawingCanvas.base-edit-mode {
  cursor: grab;
}

#gridCanvas {
  z-index: 7;
}

#drawingCanvas.is-base-dragging,
#drawingCanvas.is-panning {
  cursor: grabbing;
}

#drawingCanvas.pan-modifier {
  cursor: grab;
}

#drawingCanvas.pan-modifier.is-panning {
  cursor: grabbing;
}

#selectionMaskCanvas {
  z-index: 4;
}

#selectionContentCanvas {
  z-index: 5;
}

#selectionOutlineCanvas {
  z-index: 10;
}
